package com.andox.fn.inf.rpc.rest.serializer;

import java.util.Set;

import com.andox.fn.inf.rpc.rest.extension.ObjectFactory;
import com.google.common.collect.Sets;

public class SerializerObjectFactory extends ObjectFactory<Serializer>{

	@Override
	public Set<String> getIdentitys() {
		return Sets.newHashSet("kryo", "hessian2", "fst");
	}

	@Override
	public void init() {
		this.table.put("kryo", new KryoSerializer());
		this.table.put("hessian2", new Hessian2Serializer());
		this.table.put("fst", new FSTSerializer());
	}

	@Override
	public Serializer getDefault() {
		return this.table.get("kryo");
	}
}
